package cn.example;

import cn.example.beans.ClassA;
import cn.example.beans.ClassC;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
import org.springframework.context.support.FileSystemXmlApplicationContext;

/**
 * Hello world!
 */
public class App {
    public static void main(String[] args) {
        System.out.println("Hello World!");
        ApplicationContext applicationContext = new ClassPathXmlApplicationContext("classpath:appContext.xml");
//        new FileSystemXmlApplicationContext("D://code/appContext.xml");
//        ClassA classA = (ClassA) applicationContext.getBean("classA");
//        classA.method1();

        ClassC classC = (ClassC) applicationContext.getBean("classC");
        classC.method1();
    }
}
